package com.lsk.netdisk.commons.authz.configurations;

import com.lsk.netdisk.commons.authz.interceptor.GatewayInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

public class WebMvcConfiguration extends WebMvcConfigurerAdapter {
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(gatewayInterceptor());
		super.addInterceptors(registry);
	}
	@Bean
	public GatewayInterceptor gatewayInterceptor(){
		return new GatewayInterceptor();
	}
}
